package com.cmf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cmf.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Author: cmf
 * @Date: 2025/8/26 13:35
 * @Version: v1.0.0
 * @Description: TODO
 **/
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    /**
     * 查询指定ID的记录，忽略逻辑删除状态
     * @param id 主键ID
     * @return Category实体，包括已删除的记录
     */
    @Select("SELECT * FROM category WHERE id = #{id}")
    Category selectByIdIgnoreDeleted(@Param("id") Long id);

}
